package com.cvpoc.model;

import java.io.Serializable;

public class ExperienceCompetence implements Serializable {

	private static final long serialVersionUID = -5813678653509632405L;

	private int id_experience;
	private Competence competence;
	private String niveau;
	private String version;

	public ExperienceCompetence(String niveau, String version) {
		this.niveau = niveau;
		this.version = version;
	}

	public ExperienceCompetence() {
		super();
	}

	public int getId_experience() {
		return id_experience;
	}

	public void setId_experience(int id_experience) {
		this.id_experience = id_experience;
	}

	public Competence getCompetence() {
		return competence;
	}

	public void setCompetence(Competence competence) {
		this.competence = competence;
	}

	public String getNiveau() {
		return niveau;
	}

	public void setNiveau(String niveau) {
		this.niveau = niveau;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	@Override
	public String toString() {
		return "ExperienceCompetence [id_experience=" + id_experience
				+ ", competence=" + competence + ", niveau=" + niveau
				+ ", version=" + version + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((competence == null) ? 0 : competence.hashCode());
		result = prime * result + id_experience;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ExperienceCompetence other = (ExperienceCompetence) obj;
		if (competence == null) {
			if (other.competence != null)
				return false;
		} else if (!competence.equals(other.competence))
			return false;
		if (id_experience != other.id_experience)
			return false;
		return true;
	}

}
